const express = require('express');
const router = express.Router();
const PaymentController = require('../controllers/PaymentController');
const { authenticateToken } = require('../middleware/auth');

// 支付相关路由
router.post('/create-order', authenticateToken, PaymentController.createOrder);
router.post('/callback', PaymentController.paymentCallback);
router.get('/orders', authenticateToken, PaymentController.getOrders);
router.get('/orders/:id', authenticateToken, PaymentController.getOrderDetail);
router.put('/orders/:id/cancel', authenticateToken, PaymentController.cancelOrder);
router.post('/orders/:id/refund', authenticateToken, PaymentController.refundOrder);

module.exports = router; 